package com.my.admin.service.impl;

import com.my.admin.entity.ArticleTag;
import com.my.admin.mapper.ArticleTagMapper;
import com.my.admin.service.ArticleTagService;
import com.my.admin.util.ServiceImplCache;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.stereotype.Service;

@Service
public class ArticleTagServiceImpl extends ServiceImplCache<ArticleTagMapper, ArticleTag> implements ArticleTagService {

    @Override
    @CacheEvict(cacheNames = "batchInsert", allEntries = true)
    public boolean batchInsert(Long articleId, Long[] tags) {
        return baseMapper.batchInsert(articleId, tags) > 0;
    }

}
